package org.contended.agent;

import java.lang.instrument.ClassFileTransformer;
import java.lang.instrument.IllegalClassFormatException;
import java.security.ProtectionDomain;

import static com.google.common.base.Preconditions.*;

/**
 * fixme: Class SimpleTransformer is for porn
 *
 * @author cheremin
 * @since 12.12.11,  18:54
 */
public class SimpleTransformer implements ClassFileTransformer {

	public SimpleTransformer() {
	}

	public byte[] transform(final ClassLoader loader,
                            final String className,
                            final Class redefiningClass,
                            final ProtectionDomain domain,
                            final byte[] bytes) throws IllegalClassFormatException {
		System.out.println("Transformer to Transform Class: " + className);
		return bytes;
	}
}